#this is the recommended one, as the constant will end as soon as you exit!
require 'gserver'
class MyServer < GServer
puts( "[+] Engine Loaded, serving on port 1234!" )
  def serve( io )
    io.puts( "Hello world" )
    puts( "[-] Notification: Recieved Connection!")
    io.puts( "\n Connection has ended." )
  end
end
s = MyServer.new 1234
s.start
s.join